{extend name="public/common"/}
{block name="head"}

{/block}

{block name="banner"}

<div class="banner">
    <div class="wrapper">
        <div class="txt">
            {$category.title}
        </div>
    </div>
</div>
{/block}
{block name="body"}
{include file="document/nav"/}
<div class="faqlist">
    <div class="wrapper">
        <div class="body" style="min-height:300px;margin-bottom:30px;">
            <form>
                <ul id="lists">
                    {Cms:document name="document" category_id="$category['id']" row="6"}
                    <li>
                        <h3>Q：{$document.title}</h3>
                        <p>{$document.article.content}</p>
                    </li>
                    {/Cms:document}
                </ul>
            </form>
        </div>
        <!---->
    </div>
</div>
{/block}


{block name="script"}
<script type="text/javascript">
    $(function(){
        //问答
        $(".faqlist li h3").on("click",function(){
            if($(this).parent().find("p").is(":hidden")){
                $(this).parent().addClass("open").siblings().removeClass("open");
                $(this).parent().children("p").slideDown();
                $(this).parent().siblings().children("p").slideUp();
            }else{
                $(this).parent().removeClass("open");
                $(this).parent().children("p").slideUp();
            }
            return false
        });
    })
    <!---->
</script>

{/block}
